cmake_minimum_required (VERSION 3.5)

project (gtestdemo)

file(GLOB_RECURSE SRC_DIR "./*.cpp")
message(${SRC_DIR})

#NOTE: You don't need to add the path if your header and lib in the compiler default search path
#Add path to search include fies
#include_directories("your-include-path")
#Add path to search libraries
#link_directories("your-include-path")
link_directories("../core")

add_executable(${PROJECT_NAME} ${SRC_DIR})

target_link_libraries(${PROJECT_NAME} PRIVATE 
        gtest #note: libxxx.so -> xxx should be put here
        core
        )

#Search link modules by pkg-config tool
# find_package(PkgConfig REQUIRED)
# pkg_check_modules (SPDLOG REQUIRED IMPORTED_TARGET spdlog)

# target_link_libraries(${PROJECT_NAME} PRIVATE 
#         PkgConfig::SPDLOG
#         )
install(TARGETS ${PROJECT_NAME} DESTINATION ${INSTALL_DIR})